package uk.co.iceroad.twu.m1;

public class FizzBuzz {

    public void print(int number) {
        if(number % 3 != 0 && number % 5 != 0){
            System.out.println(number);
        }else{
            if(number % 3 == 0)
                System.out.print("Fizz");
            if(number % 5 == 0)
                System.out.print("Buzz");
            System.out.println();
        }
    }

    public static void main(String[] args) {
        FizzBuzz fizzBuzz = new FizzBuzz();
        for(int i = 0; i < 100; i++)
            fizzBuzz.print(i+1);
    }
}
